Page History: Markets
Compare Page Revisions
Page Revision: 2012/01/23 10:32
The Markets property on the MarketData object contains all the markets that have been loaded. It does not contain all the available markets.
The Market object provides the details of a single market, and allows quotes to be obtained. The properties and methods are described
here.
To obtain quotes for a market you must subscribe to it using the
DepthSubscribe method:
' Subscribe to the market.
oMarket.DepthSubscribe(DepthBuffer.Smart, DepthLevels.Normal)
The parameters are as follows:
Buffer | The buffering that should be applied. Smart is the default and is the recommended buffering setting: DepthBuffer |
Levels | The amount of depth that is required. Normal is the default and provides 10 lines of depth: DepthLevels |
In order to maintain the correct subscription level then you must handle the
MarketCheckSubscription event. If you unsubscribe from a market, or if the API itself changes the subscription level when calculating P&L, then the market will raise a MarketCheckSubscription event to check to see if there is anything else in your application that still needs the subscription. An example of how to handle this event is shown below: